<nav aria-label="Secondary navigation">
  <ul class="usa-sidenav">
    {% for link in include.links %}
      {% assign _href = link.href %}
      {% assign _current = false %}
      {% if link.href == page.url or link.href == page.permalink %}
        {% assign _current = true %}
      {% endif %}
    <li class="usa-sidenav__item">
      <a href="{% if link.external == true %}{{ link.href }}{% else %}{{ link.href | relative_url }}{% endif %}"
         {% if _current %} class="usa-current" {% endif %}
         {% if link.class %}class="{{ link.class }}" {% endif %} >
         {{ link.text }}
      </a>
      {% if _current and page.subnav %}
      <ul class="usa-sidenav__sublist">
        {% include subnav.html links=page.subnav %}
      </ul>
      {% endif %}
    </li>
    {% endfor %}
  </ul>
</nav>
